﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;

namespace SelfService.Model.Models
{
    public class SysAppointment : BasePoco
    {
        /// <summary>
        /// 支付订单号
        /// Example: a003692023042700802
        /// </summary>
        [Display(Name = "支付订单号")]
        [StringLength(128)]
        public string OrderId { get; set; }

        /// <summary>
        /// 医院ID
        /// Example: 100369001
        /// </summary>
        [Display(Name = "医院ID")]
        [StringLength(128)]
        public string HospitalId { get; set; }

        /// <summary>
        /// 科室ID
        /// Example: 1040
        /// </summary>
        [Display(Name = "科室ID")]
        [StringLength(128)]
        public string DepartmentId { get; set; }

        /// <summary>
        /// 科室
        /// </summary>
        [Display(Name = "科室")]
        [StringLength(128)]
        public string DepartmentName { get; set; }

        /// <summary>
        /// 诊疗单元代码
        /// </summary>
        [Display(Name = "诊疗单元代码")]
        [StringLength(128)]
        public string ClinicUnitId { get; set; }

        /// <summary>
        /// 医生ID
        /// </summary>
        [Display(Name = "医生ID")]
        [StringLength(128)]
        public string DoctorId { get; set; }

        /// <summary>
        /// 医生职称代码
        /// </summary>
        [Display(Name = "医生职称代码")]
        [StringLength(128)]
        public string DoctorLevelCode { get; set; }

        /// <summary>
        /// 就诊日期
        /// </summary>
        [Display(Name = "就诊日期")]
        public DateTime? AppointmentDate { get; set; }

        /// <summary>
        /// 排班号
        /// </summary>
        [Display(Name = "排班号")]
        [StringLength(128)]
        public string ScheduleId { get; set; }

        /// <summary>
        /// 预约时段ID
        /// </summary>
        [Display(Name = "预约时段ID")]
        [StringLength(128)]
        public string TimeSelectionId { get; set; }
        
        /// <summary>
        /// Example: 15:35
        /// </summary>
        [Display(Name = "预约开始时间")]
        [StringLength(128)]
        public string TimeSelectionStart { get; set; }

        /// <summary>
        /// Example: 15:40
        /// </summary>
        [Display(Name = "预约结束时间")]
        [StringLength(128)]
        public string TimeSelectionEnd { get; set; }

        /// <summary>
        /// 患者卡号
        /// </summary>
        [Display(Name = "患者卡号")]
        [StringLength(128)]
        public string HealthCardNo { get; set; }

        /// <summary>
        /// 患者ID
        /// </summary>
        [Display(Name = "患者ID")]
        [StringLength(128)]
        public string PatientId { get; set; }

        /// <summary>
        /// 患者姓名
        /// </summary>
        [Display(Name = "患者姓名")]
        [StringLength(128)]
        public string PatientName { get; set; }

        /// <summary>
        /// 身份证号码
        /// </summary>
        [Display(Name = "身份证号码")]
        [StringLength(128)]
        public string IdCardNo { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        [Display(Name = "联系方式")]
        [StringLength(128)]
        public string Phone { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        [Display(Name = "支付时间")]
        public DateTime? OrderTime { get; set; }

        /// <summary>
        /// 挂号费
        /// </summary>
        [Display(Name = "挂号费")]
        [Column(TypeName = "decimal(28,6)")]
        public decimal AppointmentFee { get; set; }

        /// <summary>
        /// 诊疗费
        /// </summary>
        [Display(Name = "诊疗费")]
        [Column(TypeName = "decimal(28,6)")]
        public decimal TreatFee { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        [Display(Name = "类型")]
        public AppointmentType Type { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [Display(Name = "状态")]
        public AppointmentStatus Status { get; set; }
    }

    public enum AppointmentType
    {
        未知,
        当日挂号,
        预约挂号
    }

    public enum AppointmentStatus
    {
        挂号中,
        挂号成功,
        挂号失败
    }
}
